const reducer = (preState= {city: "北京"}, action) => {
    const newState = {...preState};
    if (action.type === "changeCity") {
        newState.city = action.payload;
        return newState;
    }
    return preState;
}

export default reducer;